package de.farbstreich.tozen2.client;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Rectangle;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.border.Border;

public final class Formator {

	public static final Color BG_COLOR = Color.decode("#C69B5A");
	public static final Border BORDER = BorderFactory.createLineBorder(Color.decode("#806235"),2);
	
	
	public static void formateComponent(JComponent c){
		
		c.setBackground(BG_COLOR);
		c.setBorder(BORDER);
	}
	
	public static void formateButton(JButton b, int width) {
		formateButton(b, width, 28);
	}
	
	public static void formateButton(JButton b, int width, int height) {
		formateComponent(b);
		b.setBounds(new Rectangle(3,3,3,3));
		b.setPreferredSize(new Dimension(width, 28));
		b.setCursor(new Cursor(Cursor.HAND_CURSOR));
	}
}
